package rabbitmq;

import com.rabbitmq.client.Channel;
import com.rabbitmq.client.Connection;
import com.rabbitmq.client.ConnectionFactory;

import java.io.IOException;

public class Test1 {

    public static void main(String[] args) throws IOException {
        Connection connection = RabbitMQKit.getConnection();
        Channel channel = connection.createChannel();


        String data = "##0081QN=20160801085857223;ST=32;CN=3018;PW=123456;MN=123456;Flag=5;CP=&&PolId=w01018&&CD41";
        channel.basicPublish("msg.topic.exchange", "command.topic.queue", null, data.getBytes());

        System.out.println("发送完成。。。。");

        channel.close();
        connection.close();
    }
}
